package com.example.client.messageBoge;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.MessageBuilder;


@EnableBinding(Source.class)
public class Producer {

    @Autowired
    @Output(Source.OUTPUT)
    private MessageChannel channel;

    public void send() {
        System.out.println(channel);
        channel.send(MessageBuilder.withPayload("22222222222").build());
    }
}